package homework;

import java.util.Arrays;
import java.util.Random;

public class homework4 {
    public static void main(String[] args){
        int[][] arr={{1,2},{3,4,5,6},{7,8,9,10}};
        notsortArr(arr);
        for (int i=0;i<arr.length;i++){
            System.out.println(Arrays.toString(arr[i]));
        }
    }
    public static int[][] notsortArr(int[][] arr) {
        Random random = new Random();
        for (int i = 0; i < arr.length; i++) {
            for(int l=0;l<arr[i].length;l++){
                int j = random.nextInt(arr.length-1);
                int k=random.nextInt(arr[i].length-1);
                if(i!=j&&l!=k){
                    continue;
                }
                int temp = arr[i][l];
                arr[i][l] = arr[j][k];
                arr[j][k] = temp;
            }

        }
        return arr;
    }
}
